<?php
namespace Test\Service\Test;
class TestService{
    public function __construct()
    {

    }

    public function  unionQuery()
    {
        $ta=D('Test/Test');
        $_where['a.id']='b.id';
        $list= $ta->field("a.id,a.info,b.name1")->alias('a')->join('tp_test2 as b on a.id=b.id');
        return $list;

    }

    public function test()
    {
        return 'test';
    }

    public function getNickNameById($id=0)
    {
        $test=D('Test/Test');
        $info =$test->where(array('id'=>$id))->select();
        return $info;
    }

    public function getMenu()
    {
        $menu=D('Test/Menu');
        return $menu->getMenu();

    }

}